package fr.norsys.mapper.console.model;

import java.util.Comparator;

public class VariableNameComparator implements Comparator {
	
	VariableNameComparator(){
		super();
	}
public int compare(Object o1, Object o2) {
	int result = 0;
	if(o1 instanceof Variable && o2 instanceof Variable) {
		Variable r1 = (Variable) o1;
		Variable r2 = (Variable) o2;
		if(r1.getName()!=null && r2.getName()!=null)
			{result = r1.getName().compareTo(r2.getName());}
	}
	return result;
}
}
